<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="Generator" content="ALORK 20150428.01" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

<title><?php echo $this->_var['top_title']; ?></title>



<link rel="stylesheet" href="./public/my_style.css" />
<link rel="stylesheet" href="./public/coupon.css" />
<script type="text/javascript" src="./../js/jquery.js"></script>
</head>
<body>
<?php echo $this->fetch('library/user_head.lbi'); ?>
<div id="user_coupon">
  <?php if (! empty ( $this->_var['couponOld'] ) || ! empty ( $this->_var['couponUse'] ) || ! empty ( $this->_var['couponIsUse'] )): ?>
  <div class="top">
    <a href="coupon.php?act=explain" title="优惠券使用说明"><h1>优惠券使用说明</h1></a>
  </div>
  <div class="content">
    <span class="triangle"></span>
    
    <?php $_from = $this->_var['couponIsUse']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'coupon_son');if (count($_from)):
    foreach ($_from AS $this->_var['coupon_son']):
?>
      <?php if ($this->_var['coupon_son']['type_code'] == 'baoyou'): ?>
      <div class="packet_mail_part comment_part">
        <img src="../mobile/images/packet_mail.png" alt="包邮券">
        <h1><?php echo $this->_var['coupon_son']['coupon_name']; ?></h1>
        <p class="p1"><?php echo $this->_var['coupon_son']['coupon_note']; ?></p>
        <p class="p2">
          有效期：<?php echo $this->_var['coupon_son']['start_time_format']; ?>至<?php echo $this->_var['coupon_son']['end_time_format']; ?>
        </p>
        <?php if (coupon_son.is_due == 1): ?><p class="p3">即将到期</p><?php endif; ?>
      </div>
      <?php endif; ?>
      <?php if ($this->_var['coupon_son']['type_code'] == 'discount'): ?>
      <div class="discount_coupon_part comment_part">
        <img src="../mobile/images/discount_coupon.png" alt="折扣券">
        <h1><?php echo $this->_var['coupon_son']['coupon_name']; ?></h1>
        <p class="p1"><?php echo $this->_var['coupon_son']['coupon_note']; ?></p>
        <p class="p2">
            有效期：<?php echo $this->_var['coupon_son']['start_time_format']; ?>至<?php echo $this->_var['coupon_son']['end_time_format']; ?>
        </p>
        <?php if (coupon_son.is_due == 1): ?><p class="p3">即将到期</p><?php endif; ?>
      </div>
      <?php endif; ?>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

    
    <?php $_from = $this->_var['couponUse']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'coupon_son1');if (count($_from)):
    foreach ($_from AS $this->_var['coupon_son1']):
?>
      <?php if ($this->_var['coupon_son1']['type_code'] == 'baoyou'): ?>
      <div class="packet_mail_part comment_part">
        <img src="../mobile/images/packet_mail_no.png" alt="包邮券">
        <h1><?php echo $this->_var['coupon_son1']['coupon_name']; ?></h1>
        <p class="p1"><?php echo $this->_var['coupon_son1']['coupon_note']; ?></p>
        <p class="p2">
          有效期：<?php echo $this->_var['coupon_son1']['start_time_format']; ?>至<?php echo $this->_var['coupon_son1']['end_time_format']; ?>
        </p>
        <p class="p3">已使用</p>
      </div>
      <?php endif; ?>
      <?php if ($this->_var['coupon_son1']['type_code'] == 'discount'): ?>
      <div class="discount_coupon_part comment_part">
        <img src="../mobile/images/discount_coupon_no.png" alt="折扣券">
        <h1><?php echo $this->_var['coupon_son1']['coupon_name']; ?></h1>
        <p class="p1"><?php echo $this->_var['coupon_son1']['coupon_note']; ?></p>
        <p class="p2">
            有效期：<?php echo $this->_var['coupon_son1']['start_time_format']; ?>至<?php echo $this->_var['coupon_son1']['end_time_format']; ?>
        </p>
        <p class="p3">已使用</p>
      </div>
      <?php endif; ?>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

    
    <?php $_from = $this->_var['couponOld']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'coupon_son2');if (count($_from)):
    foreach ($_from AS $this->_var['coupon_son2']):
?>
      <?php if ($this->_var['coupon_son2']['type_code'] == 'baoyou'): ?>
      <div class="packet_mail_part comment_part">
        <img src="../mobile/images/packet_mail_no.png" alt="包邮券">
        <h1><?php echo $this->_var['coupon_son2']['coupon_name']; ?></h1>
        <p class="p1"><?php echo $this->_var['coupon_son2']['coupon_note']; ?></p>
        <p class="p2">
          有效期：<?php echo $this->_var['coupon_son2']['start_time_format']; ?>至<?php echo $this->_var['coupon_son2']['end_time_format']; ?>
        </p>
        <p class="p3">已过期</p>
      </div>
      <?php endif; ?>
      <?php if ($this->_var['coupon_son2']['type_code'] == 'discount'): ?>
      <div class="discount_coupon_part comment_part">
        <img src="../mobile/images/discount_coupon_no.png" alt="折扣券">
        <h1><?php echo $this->_var['coupon_son2']['coupon_name']; ?></h1>
        <p class="p1"><?php echo $this->_var['coupon_son2']['coupon_note']; ?></p>
        <p class="p2">
            有效期：<?php echo $this->_var['coupon_son2']['start_time_format']; ?>至<?php echo $this->_var['coupon_son2']['end_time_format']; ?>
        </p>
        <p class="p3">已过期</p>
      </div>
      <?php endif; ?>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    
  </div>
  <?php else: ?>
  <div class="empty_vouchers">
    <div class="empty_content">
      <img src="../mobile/images/empty_vouchers.png" alt="您现在还没有优惠券">
      <p>
        您现在还没有优惠券，<br />
        快去领取吧!
      </p>
      <a href="#" title="获取优惠券">获取优惠券</a>
    </div>
  </div>
  <?php endif; ?>
</div>
<script type="text/javascript">
  auto2();
  /*字体大小自适应rem单位*/
  function auto2(){
    var width = $('body').width();
    var font_size = 20*(width/320);
    var font_size2 = (width/320)*625+'%';
    $('body').css('font-size',font_size);
    $('html').css('font-size',font_size2);
  }

  /*浏览器横屏坚屏改变时也运行函数*/
  window.onorientationchange = function() {
    auto2();
  };

  /* 浏览器窗口发生改变也运行函数*/
  window.onresize=function(){
    auto2();
  };

</script>
</body>
</html>